package com.shenmazong.user.controller;

import com.shenmazong.user.service.TbUserService;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.IdVo;
import com.shenmazong.vo.LoginVo;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 军哥
 * @version 1.0
 * @description: TODO
 * @date 2022/8/3 16:20
 */
@RestController
@Slf4j
@RequestMapping(value = "/user")
public class TbUserController {

    @Autowired
    TbUserService tbUserService;

    @PostMapping(value = "/get")
    public ResultResponse get(@RequestBody IdVo idVo) {
        return tbUserService.get(idVo);
    }

    @PostMapping(value = "/login")
    public ResultResponse login(@RequestBody LoginVo loginVo) {
        return tbUserService.login(loginVo);
    }
}
